Represents a node in a scene graph. More...
Represents a node in a scene graph.
The graph can be used whenever transformations of entities are needed.
|
virtual |
Sets the position of the node, relative to its parent.
| value | The position to set. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Sets the position of the node, absolute in the world.
| value | The position to use. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Translates the node, relative to its parent.
| value | The offset to add. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Translates a node, absolute in the world.
| value | The offset to add. |
Reimplemented in nkGraphics::Camera.
| nkMaths::Vector nkGraphics::Node::getPositionRelative | ( | ) | const |
| nkMaths::Vector nkGraphics::Node::getPositionAbsolute | ( | ) |
|
virtual |
Sets the orientation of a node, relative to its parent.
| value | The orientation to set. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Sets the orientation of a node, absolute in the world.
| value | The orientation to set. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Rotates a node, relative to its parent.
| value | The offset to add. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Rotates a node, absolute in the world.
| value | The offset to add. |
Reimplemented in nkGraphics::Camera.
| nkMaths::Quaternion nkGraphics::Node::getOrientationRelative | ( | ) | const |
| nkMaths::Quaternion nkGraphics::Node::getOrientationAbsolute | ( | ) |
|
virtual |
Sets the scale of the node, relative to its parent.
| value | The scale to set. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Sets the scale of the node, absolute in the world.
| value | The scale to set. |
Reimplemented in nkGraphics::Camera.
|
virtual |
Scales the node by a factor.
| value | The offset to add. |
Reimplemented in nkGraphics::Camera.
| nkMaths::Vector nkGraphics::Node::getScaleRelative | ( | ) | const |
| nkMaths::Vector nkGraphics::Node::getScaleAbsolute | ( | ) |
| nkMaths::Matrix nkGraphics::Node::getLocalTransform | ( | ) |
| nkMaths::Matrix nkGraphics::Node::getAbsoluteTransform | ( | ) |
| void nkGraphics::Node::updateTransformations | ( | ) |
Updates the transformation of a node. Used internally.
| void nkGraphics::Node::dispatchDirtyTransform | ( | ) |
Dispatches a dirty transform flag to the children. Used internally.
| nkMaths::Vector nkGraphics::Node::getAbsoluteUp | ( | ) |
| nkMaths::Vector nkGraphics::Node::getAbsoluteFront | ( | ) |
| nkMaths::Vector nkGraphics::Node::getAbsoluteRight | ( | ) |
| Node* nkGraphics::Node::getParentNode | ( | ) | const |
| Node* nkGraphics::Node::addChildNode | ( | ) |
Adds a child node.
| Node* nkGraphics::Node::addChildNode | ( | const std::string_view & | name | ) |
Adds a child node, with a given name.
| void nkGraphics::Node::addChildNode | ( | Node * | node | ) |
Adds an existing node as a child.
| node | The node to add. |
| Node* nkGraphics::Node::getChildNode | ( | unsigned int | index | ) | const |
| index | The index of the child to retrieve. |
| unsigned int nkGraphics::Node::getNumChildNode | ( | ) | const |
| void nkGraphics::Node::insertIntoTreeFrom | ( | Node * | parent | ) |
Inserts the node in a tree.
| parent | The node which will be the parent. |
| void nkGraphics::Node::detachFromTree | ( | ) |
Detaches a node from the local tree it is in.
| std::string_view nkGraphics::Node::getName | ( | ) | const |
| bool nkGraphics::Node::getHidden | ( | ) | const |
| void nkGraphics::Node::setHidden | ( | bool | value | ) |
Sets whether the node should not export itself during a project (resource set) export. This can be used to hide programmatically generated resources from duplicating in the export.
| value | Whether the node should be hidden (true) or not (false). |
| void nkGraphics::Node::addEntityToTrack | ( | Entity * | entity | ) |
Tracks entity for changes. Used internally, in theory external code should not used it. Rather, see Entity::setParentNode().
| void nkGraphics::Node::stopEntityTracking | ( | Entity * | entity | ) |
Stops tracking an entity for its changes. Used internally, in theory external code should not used it. Rather, see Entity::setParentNode().
| unsigned int nkGraphics::Node::getTrackedEntityCount | ( | ) | const |
| Entity* nkGraphics::Node::getTrackedEntity | ( | unsigned int | index | ) | const |
| index | The index of the tracked entity to retrieve. |
| void nkGraphics::Node::registerListener | ( | NodeChangeListener * | listener | ) |
Register a listener.
| listener | The listener to register. |
| void nkGraphics::Node::unregisterListener | ( | NodeChangeListener * | listener | ) |
Unregister a listener.
| listener | The listener to unregister. |
|
overridevirtual |
Basic exporting capabilities.
| rootNode | The tree to export to. |
Implements nkExport::Exportable.
Reimplemented in nkGraphics::Camera.
|
overridevirtual |
Basic importing capabilities.
| rootNode | The tree to import from. |
Implements nkExport::Exportable.
Reimplemented in nkGraphics::Camera.